<script>
import dataApi from '@/view/data-api-edit'
export default {
  render () {
    let itemData = dataApi.currActiveItem
    let itemDataSet = dataApi.currActiveItemSet
    return (
      <div>
        <div class="set-item">
          <div class="tit">选项</div>
          <div class="it">
            <select onChange={({ target }) => { itemData.rollType = target.value * 1 }} value={itemData.rollType}>
              <option value="1">上下滚动</option>
              <option value="2">左右滚动</option>
            </select>
          </div>
        </div>
        <div class="set-item">
          <div class="tit">预览</div>
          <div class="it">
            <a href="javascript:;" onClick={() => { itemDataSet.roll = !itemDataSet.roll }}>{itemDataSet.roll ? '停止滚动' : '滚动预览'}</a>
          </div>
        </div>
      </div>
    )
    // return (
    //   <div>
    //     <div class="set-item">
    //       <div class="tit">选项</div>
    //       <div class="it">
    //         <select onChange={({ target }) => { itemData.rollType = target.value * 1 }} value={itemData.rollType}>
    //           <option value="1">上下滚动</option>
    //           <option value="2">左右滚动</option>
    //         </select>
    //       </div>
    //     </div>
    //   </div>
    // )
  }
}
</script>
